<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>开关灯1</title>
    <style>
        a{
            color: #c01900;
            text-decoration: none;
        }
    </style>
</head>
<body>
<a href="开关灯2.html">开关灯2</a>
<br/>
<br/>
<img src="pic_bulboff.gif" id="deng" onclick="kaideng()" />
<script>
    var i = 0;
    function kaideng(){
        if(i==0){
            deng.src = "pic_bulboff.gif";
            i = 1;
        }else{
            deng.src = "pic_bulbon.gif";
            i = 0;
        }
    }
</script>
</body>
</html>